﻿using System;
using System.Collections.Generic;
using System.Text;

namespace designmodule.constructionmodule.AbstractFactory.NormalAbstractFactory
{
    public interface IFactory
    {
        IUser CreateUser();
        IDepartment CreateDepartment();
    }

    public class SqlServerFactory : IFactory
    {
        public IUser CreateUser()
        {
            return new SqlserverUser();
        }

        public IDepartment CreateDepartment()
        {
            return new SqlserverDepartment();
        }
    }

    public class MySqlFactory:IFactory
    {
        public IUser CreateUser()
        {
            return new MysqlUser();
        }

        public IDepartment CreateDepartment()
        {
            return new MysqlDepartment();
        }
    }
}
